<template>
    <div class="app-container" style="padding: 5px;">
        <el-card>
            <el-row :gutter="10" class="mb8" v-if="SysCgzqImportList.length>0">
                <el-col :span="1.5">
                    <el-button type="success" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
                </el-col>
            </el-row>
            <el-table v-loading="loading" :data="SysCgzqImportList" border>
                <el-table-column type="index" width="55" align="center" />
                <el-table-column label="大品类" align="center" prop="brand" />
                <el-table-column label="规格" align="center" prop="spec" />
                <el-table-column label="产品编码" align="left" prop="pcode" />
                <el-table-column label="用友产品名称" width="400" align="left" prop="cname" />
                <el-table-column label="采购英文名" width="400" align="left" prop="ename" />
                <el-table-column label="期初库存" align="center" prop="qty" />
                <el-table-column label="可调整数量" align="center" prop="changeqty" />
            </el-table>
        </el-card>
    </div>
  </template>
  
  <script>
   import { listCgzqImport } from "@/api/system/cg/cgimport";
  
  export default {
    name: "Zqquery",
    data() {
      return {
        SysCgzqImportList: [],
      };
    },
    created() {
      this.getList();
    },
    methods: {
      /** 查询SysCgzqImport列表 */
      getList() {
        listCgzqImport().then(res => {
          this.SysCgzqImportList = res.data;
        });
      },
      /** 导出按钮操作 */
      handleExport() {
        this.download('system/importcg/exportCgzq', {
          ...this.queryParams
        }, `种球类返表导入历史数据_${new Date().getTime()}.xlsx`)
      }
    }
  };
  </script>
  